home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-11-08 | 5.5 KB | 190 lines | [TEXT/KAHL] |
- /******************************************************************************
- CAbout.cp
-
- CAbout Dialog Director Class
-
- Copyright © 1995 Dan Crevier. All rights reserved.
-
- Generated by Visual Architectâ„¢ 8:23 PM Wed, Nov 8, 1995
-
- This file is only generated once. You can modify it by filling
- in the placeholder functions and adding any new functions you wish.
-
- If you change the name of the dialog class, a fresh version of this
- file will be generated. If you have made any changes to the file
- with the old name, you will have to copy those changes to the new
- file by hand.
-
- ******************************************************************************/
-
- #include "CAbout.h"
-
- #include "AboutItems.h"
- //#include "AppCommands.h" // Remove comments if DoCommand overridden
-
- #include <CIntegerText.h>
- #include <CControl.h>
- #include <CPopupMenu.h>
- #include <CPopupPane.h>
- #include <CArrayPane.h>
- #include <CIconButton.h>
- #include <CPictureButton.h>
- #include <CSwissArmyButton.h>
-
- #include <CApplication.h>
- #include <Constants.h>
- #include <CDecorator.h>
- #include <CDesktop.h>
- #include <CDirectorOwner.h>
- #include <CFile.h>
- #include <TBUtilities.h>
- #include <CWindow.h>
-
- extern CApplication *gApplication; /* The application */
- extern CDecorator *gDecorator; /* Decorator for arranging windows */
- extern CDesktop *gDesktop; /* The visible Desktop */
-
-
- TCL_DEFINE_CLASS_M1(CAbout, x_CAbout);
-
- /**** C O N S T R U C T I O N / D E S T R U C T I O N M E T H O D S ****/
-
-
- /******************************************************************************
- ICAbout
-
- Initialize the dialog
-
- ******************************************************************************/
-
- void CAbout::ICAbout(CDirectorOwner *aSupervisor)
-
- {
- // Initialize data members that must be set up before
- // BeginData is called here.
-
- // Change FALSE to TRUE if you want to call SetData()
- // and GetData() to initialize and fetch final pane values.
- // (This is known as a push-style dialog, rather than the
- // default pull-style.)
-
- x_CAbout::Ix_CAbout(aSupervisor, FALSE);
-
- // Initialize any other data members here
-
- }
-
-
- /******************************************************************************
- BeginData
-
- Set up initial pane values
- ******************************************************************************/
-
- void CAbout::BeginData(CAboutData *initial)
-
- {
- // Base class calls BeginData once after the window is created
- // to gather the initial values for the dialog panes. Note that
- // BeginData is called *before* Ix_CAbout returns. The
- // initial struct is cleared to zeros.
-
- // Calling CollectPaneValues copies the initial values you set
- // in Visual Architect from the panes. This lets you
- // use these values as the starting point every time the dialog
- // is run. If you want to use values determined by your program
- // instead, omit this call.
-
- CollectPaneValues(*initial);
-
- // Add code to replace some or all of the initial pane values below.
-
- }
-
-
- /******************************************************************************
- UpdateData
-
- React to changes by the user (or the program)
- ******************************************************************************/
-
- void CAbout::UpdateData(CAboutUpdate *update, long itemNo)
-
- {
- // UpdateData is called every time the user or the program
- // changes the value of a dialog pane. (Changes you make to
- // panes during a call to UpdateData do not result in
- // recursive calls to UpdateData.)
-
- // Override to dynamically update other program objects.
- // Note that *only* the value corresponding to itemNo is present in
- // the update record. If you need the values of other panes,
- // you must ask the panes for them.
- }
-
-
- /******************************************************************************
- EndData
-
- Receive final values from the dialog
- ******************************************************************************/
-
- void CAbout::EndData(CAboutData *final)
-
- {
- // The values of all panes are returned by this function,
- // which is called just before Close for a modeless dialog,
- // or just before returning from DoModalDialog.
-
- // If DoModalDialog returns cmdCancel, EndData is called
- // with the values initially supplied to BeginData, allowing
- // you to back out any intermediate changes made in response
- // to UpdateData. If you do not use UpdateData, you can
- // test the value of dismissCmd to see whether to respond
- // to EndData.
- }
-
-
- /******************************************************************************
- ProviderChanged {OVERRIDE}
-
- A pane changed value
- ******************************************************************************/
-
- void CAbout::ProviderChanged(CCollaborator *aProvider, long reason, void* info)
-
- {
- // Override this function if you need to respond more directly
- // to changes in pane values. See the superclass's ProviderChanged
- // function for an example of how to check for changes.
-
- // Note that there is a lot of traffic through this function
- // in addition to change notices. Do not forget to call the
- // superclass for all changes you do not handle completely.
-
- x_CAbout::ProviderChanged(aProvider, reason, info);
- }
-
-
- /******************************************************************************
- DoCommand {OVERRIDE}
-
- Dispatch commands
- ******************************************************************************/
-
- void CAbout::DoCommand(long theCommand)
-
- {
- switch (theCommand)
- {
- // Insert your command handler cases here, e.g.,
- //
- // case cmdMine:
- // DoMyCmd();
- // break;
-
- default:
- x_CAbout::DoCommand(theCommand);
- }
- }
-